import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
// 导入全局样式表
import './assets/css/global.css'

import { 
  Tabs,
  TabPane,
  Card,
  Rate,
  Statistic,
  Descriptions,
  DescriptionsItem,
  Tag,Option,Select,Slider,Divider,
  Steps,Step,Drawer,InputNumber} from 'element-ui';
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Card);
Vue.use(Rate);
Vue.use(Statistic);
Vue.use(Descriptions);
Vue.use(DescriptionsItem);
Vue.use(Tag);
Vue.use(Option);
Vue.use(Select);
Vue.use(Slider);
Vue.use(Divider);
Vue.use(Steps);
Vue.use(Step);
Vue.use(Drawer);
Vue.use(InputNumber);

import axios from 'axios'
import Print from './utils/vue-print-nb/src'
Vue.use(Print)
// 配置请求的根路径
// axios.defaults.baseURL = 'https://mock.apifox.cn/m1/1473865-0-default'
axios.defaults.baseURL = 'http://172.16.2.141:8001/'
// axios.defaults.baseURL = 'http://127.0.0.1:8001/'
// axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
// 请求拦截器
axios.interceptors.request.use(config=>{
  // console.log(config)
  config.headers.authorization = 'jwt '+window.sessionStorage.getItem('token')
  return config
})
// 挂载到vue
Vue.prototype.$http = axios


Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
